package gui;

import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EtchedBorder;
import javax.swing.border.TitledBorder;

import entities.Student;

class EmployeeStudentInfoPanel extends JPanel {

	private static final long serialVersionUID = 1L;

	/**
	 * Construct a panel with the current information for the current student
	 */
	public EmployeeStudentInfoPanel(Student student) {
		setBorder(new TitledBorder(new EtchedBorder(), "Personal Information"));
		setLayout(new GridLayout(5, 2));

		JLabel name = new JLabel("Name: " + student.getName());
		add(name);
		JLabel id = new JLabel("ID: " + student.getID());
		add(id);
		JLabel birthday = new JLabel("Birthday: "
				+ student.getBirthdateAsString());
		add(birthday);
		JLabel sin = new JLabel("SIN: " + student.getSIN());
		add(sin);
		JLabel address = new JLabel("Address: " + student.getAddress());
		add(address);
		JLabel citizen = new JLabel("Citizen: " + student.getIsCitizen());
		add(citizen);
		JLabel maritalStatus = new JLabel("Marital Status: "
				+ student.getMaritalStatus());
		add(maritalStatus);
		JLabel institutionEnrolled = new JLabel("Institution Enrolled: "
				+ student.getInstitution());
		add(institutionEnrolled);
	}
}
